Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rv-b: mark B-ext in misa #397

Merged
merged 1 commit into from
Jul 24, 2024
Merged

rv-b: mark B-ext in misa #397

merged 1 commit into from
Jul 24, 2024

Conversation

shinezyy
Copy link
Contributor

No description provided.

@poemonsense
Copy link
Member

poemonsense commented Jul 15, 2024

It seems RISC-V has a Kconfig option indicating B extension.

#ifdef CONFIG_RVB
misa->extensions |= ext('b');
#endif

@shinezyy shinezyy force-pushed the mark-bit-ext-in-misa branch 2 times, most recently from 2d3b44d to 54181fa Compare July 16, 2024 02:57
@@ -130,7 +130,7 @@ jobs:
make riscv64-rvh-diff-spike_defconfig
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this config should be changed to riscv64-xs-diff-spike_defconfig. This will solved the current stack overflow problem. But there are still problems because of #407

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but before 407 is merged, I want to add a guard for NEMU as DUT.

Copy link
Contributor Author

@shinezyy shinezyy Jul 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this config should be changed to riscv64-xs-diff-spike_defconfig. This will solved the current stack overflow problem. But there are still problems because of #407

I enabled RVV in riscv64-rvh-diff-spike_defconfig, and it works.
It does not work with riscv64-xs-diff-spike_defconfig, here is diff:

< # CONFIG_RV_ZICNTR is not set
< # CONFIG_RV_ZIHPM is not set
---
> CONFIG_RV_ZICNTR=y
> # CONFIG_RV_CSR_TIME is not set
> CONFIG_RV_ZIHPM=y
30,31c31,32
< # CONFIG_RV_CSR_MCOUNTINHIBIT_CNTR is not set
< # CONFIG_RV_CSR_MCOUNTINHIBIT_HPM is not set
---
> CONFIG_RV_CSR_MCOUNTINHIBIT_CNTR=y
> CONFIG_RV_CSR_MCOUNTINHIBIT_HPM=y
112c113
< # CONFIG_MEM_COMPRESS is not set
---
> CONFIG_MEM_COMPRESS=y

@shinezyy shinezyy force-pushed the mark-bit-ext-in-misa branch 4 times, most recently from 12effbc to 59b1e79 Compare July 24, 2024 07:16
- Mark RVB in misa when RVB is enabled.
- Unify spike ref so used for RVV and RVH tests.
- Add CI running OpenSBI+Linux+Vectorized_h264 with Spike DiffTest,
which ensure basic RVH and RVV works.
- To prevent mistakenly breaking difftest (as DUT), this patch add
an failed testcase into CI to make sure difftest is working as expected.
The failed testcase compare NEMU with RVV agnostic enabled against
spike (with no agnostic), which should always fail and should
print something like
`right =  .... , wrong =  ffffffffffffffff_ffffffff00000003`
match=$(grep "wrong.*=.*ffff" crash.log -c)
if [ ${match} -eq 0 ]; then echo "Difftest is broken, it should report at least one agnostic related difference!" exit 1; fi
make clean-all
set +x
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@poemonsense @cebarobot I check the behavior of a failed case here.

@shinezyy shinezyy merged commit b9c72c6 into master Jul 24, 2024
6 checks passed
@shinezyy shinezyy deleted the mark-bit-ext-in-misa branch July 24, 2024 09:36
xinhecuican pushed a commit to xinhecuican/NEMU that referenced this pull request Aug 31, 2024
…n#397)

- Mark RVB in misa when RVB is enabled.
- Unify spike ref so used for RVV and RVH tests.
- Add CI running OpenSBI+Linux+Vectorized_h264 with Spike DiffTest,
which ensure basic RVH and RVV works.
- To prevent mistakenly breaking difftest (as DUT), this patch add
an failed testcase into CI to make sure difftest is working as expected.
The failed testcase compare NEMU with RVV agnostic enabled against
spike (with no agnostic), which should always fail and should
print something like
`right =  .... , wrong =  ffffffffffffffff_ffffffff00000003`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants